﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Diagnostics;

namespace PhoneAppSTS
{
    public partial class MainPage : PhoneApplicationPage
    {
        private bool isAnimationFinish = false;
        // Constructor
        public MainPage()
        {
            ApplicationBar = App.AppBar;
            InitializeComponent();
			MenuStartStoryboard.Begin();
            MenuStartStoryboard.Completed += new EventHandler(MenuStartStoryboard_Completed);
        }

        void MenuStartStoryboard_Completed(object sender, EventArgs e)
        {
            isAnimationFinish = true;
        }

        private void imageInformacje_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            if (isAnimationFinish)
            {
                NavigationService.Navigate(new Uri("/Information.xaml",UriKind.RelativeOrAbsolute));
            }
        }

        private void imageBadania_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            if (isAnimationFinish)
            {
                NavigationService.Navigate(new Uri("/Survey.xaml", UriKind.RelativeOrAbsolute));
            }
        }

        private void imageStanLekow_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            if (isAnimationFinish)
            {
                NavigationService.Navigate(new Uri("/StateMedication.xaml", UriKind.RelativeOrAbsolute));
            }
        }

        private void imagePrzyjmowaneLeki_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            if (isAnimationFinish)
            {
                NavigationService.Navigate(new Uri("/Medicine.xaml", UriKind.RelativeOrAbsolute));
            }
        }

    }
}